<%@page import="com.petshop.model.Product"%>
<%@page import="java.util.List"%>

<div class="title">
	<span class="title_icon"><img src="images/bullet1.gif" alt=""
		title="" /></span><%=rb.getString("home.feature")%>
</div>

<div class="feat_prod_box">
	<div class="prod_img">
		<a href="LoginServlet?page=details&productId=${productRateList[0].productId}"><img
			src="${productRateList[0].productImage}" alt="" title="" border="0" /></a>
	</div>

	<div class="prod_det_box">
		<div class="box_top"></div>
		<div class="box_center">
			<div class="prod_title"><%=rb.getString("home.product_name")%>
				: ${productRateList[0].productName}
			</div>
			<p class="details">${productRateList[0].productDesc}</p>
			<a href="LoginServlet?page=details&productId=${productRateList[0].productId}" class="more"><%=rb.getString("home.moredetails")%></a>
			<div class="clear"></div>
		</div>

		<div class="box_bottom"></div>
	</div>
	<div class="clear"></div>
</div>
<div class="feat_prod_box">

	<div class="prod_img">
		<a href="LoginServlet?page=details&productId=${productRateList[1].productId}"><img
			src="${productRateList[1].productImage}" alt="" title="" border="0" /></a>
	</div>

	<div class="prod_det_box">
		<div class="box_top"></div>
		<div class="box_center">
			<div class="prod_title"><%=rb.getString("home.product_name")%>
				: ${productRateList[1].productName}
			</div>
			<p class="details">${productRateList[1].productDesc}</p>
			<a href="LoginServlet?page=details&productId=${productRateList[1].productId}" class="more"><%=rb.getString("home.moredetails")%></a>
			<div class="clear"></div>
		</div>

		<div class="box_bottom"></div>
	</div>
	<div class="clear"></div>
</div>
<div class="feat_prod_box">

	<div class="prod_img">
		<a href="LoginServlet?page=details&productId=${productRateList[2].productId}"><img
			src="${productRateList[2].productImage}" alt="" title="" border="0" /></a>
	</div>

	<div class="prod_det_box">
		<div class="box_top"></div>
		<div class="box_center">
			<div class="prod_title"><%=rb.getString("home.product_name")%>
				: ${productRateList[2].productName}
			</div>
			<p class="details">${productRateList[2].productDesc}</p>
			<a href="LoginServlet?page=details&productId=${productRateList[2].productId}" class="more"><%=rb.getString("home.moredetails")%></a>
			<div class="clear"></div>
		</div>

		<div class="box_bottom"></div>
	</div>
	<div class="clear"></div>
</div>


<div class="title">
	<span class="title_icon"><img src="images/bullet2.gif" alt=""
		title="" /></span><%=rb.getString("home.newproduct")%>
</div>

<div class="new_products">

	<%
		List<Product> list = (List<Product>) request.getAttribute("productNewLoad");
		for (int i = 0; i < news ; i++) {
			if(i < list.size()){
	%>
	<div class="new_prod_box">
		<a href="LoginServlet?page=details"><%=list.get(i).getProductName()%></a>
		<div class="new_prod_bg">
			<span class="new_icon"><img src="" alt=""
				title="" /></span> <a href="LoginServlet?page=details&productId=<%=list.get(i).getProductId()%>"><img
				src="<%=list.get(i).getProductImage()%>" alt="" title="" class="thumb" border="0" /></a>
		</div>
	</div>

	<%
			}
		}
	%>

</div>

<script type="text/javascript">

	
<%-- 	var oo = <%=loginUsername%> --%>
	
// 	function timeout_trigger() {
// 	    window.alert('Hello!'+oo);   
// 	}
	
// 	function timeout_init() {
// 	    setTimeout('timeout_trigger()', 2000);
// 	}
	
// 	timeout_init();
	
</script>

